/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sgep.actions;

import com.opensymphony.xwork2.ActionSupport;
import java.util.List;
import sgep.po.Application;
import sgep.services.ApplicationService;

/**
 *
 * @author mg
 */
public class ApplicationList extends ActionSupport {
    private boolean success = true;
    private List<Application> apps;

    private ApplicationService appService;

    public ApplicationService getAppService() {
        return appService;
    }

    public void setAppService(ApplicationService appService) {
        this.appService = appService;
    }

    public List<Application> getApps() {
        return apps;
    }

    public void setApps(List<Application> apps) {
        this.apps = apps;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    @Override
    public String execute() throws Exception {
        apps = this.appService.getAppList();
        return "success";
    }

}
